package org.smi;

import java.io.*;
import java.net.URL;

/**
 * @Author: ism
 * @Platform: Mac
 * @Date: 下午7:54 2018/6/30
 */
public class RunExec2 implements Runnable {

    private String url;
    private String saveDir;
    private String fileName;
    private int id;

    public void setUrl(String url) {
        this.url = url;
    }

    public void setSaveDir(String saveDir) {
        this.saveDir = saveDir;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public void run() {
        download(url, saveDir, fileName, id);
    }

    public static void download(String url, String saveDir, String fileName, int id) {
        //App.countDownLatch.countDown();
        System.out.println("下载完成 -> " + id);
    }
}
